package com.juku2024.juku.callback

import android.view.View
import java.util.*


interface OnNoDoubleClickListener : View.OnClickListener {

    companion object {
        private var lastClickTime: Long = 0L
        private const val MIN_CLICK_DELAY_TIME = 500L
    }

    override fun onClick(v: View?) {
        val currentTime = Calendar.getInstance().timeInMillis
        if (currentTime - lastClickTime < MIN_CLICK_DELAY_TIME) {
            return
        }
        lastClickTime = currentTime

        onNoDoubleClick(v)
    }

    fun onNoDoubleClick(v: View?){

    }

}